﻿namespace DoxyOutParser.Launcher
{
	using System.ComponentModel;
	using System.Diagnostics;

	internal class TextPadLauncher
	{
		private TextPadLauncher()
		{
		}

		public static void Launch(string doxyFileName, string line)
		{
			ProcessStartInfo startInfo = new ProcessStartInfo();
			startInfo.FileName = "C:\\Program Files\\TextPad 4\\TextPad.exe";
			startInfo.WindowStyle = ProcessWindowStyle.Hidden;
			startInfo.Arguments = doxyFileName + "(" + line + ")";
			try
			{
				Process.Start(startInfo);
			}
			catch (Win32Exception exception)
			{
				throw new Win32Exception(exception.Message + ": " + startInfo.FileName);
			}
		}
	}
}
